package com.nori6.ui;

import com.nori6.controller.NoriController;

import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;

public abstract class NoriActivity extends Activity
{
protected NoriController _controller;
	
	protected int _screenHeight;
	protected int _screenWidth;
	
	 public void onCreate(Bundle savedInstanceState) 
	 {
			super.onCreate(savedInstanceState);
		
			if((Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB))
	 		{
	 			android.graphics.Point size = new android.graphics.Point();
	 			getWindowManager().getDefaultDisplay().getSize(size);
	 			
	 			_screenHeight = size.x;
	 			_screenWidth  = size.y;
	 		}
			else
			{
				_screenHeight = getWindowManager().getDefaultDisplay().getHeight();
				_screenWidth  = getWindowManager().getDefaultDisplay().getWidth(); 
			}
			
			_controller = createController();
		}

		public void invokeStartActivityForResult(Intent intent, int requestCode)
		{
			startActivityForResult(intent, requestCode);
		}
	 	
		protected abstract NoriController createController();
}


